' 2.4" LCD Test for B11 470 firmware

CPU 96

  Dim integer BLUE    = &H001F
  Dim integer RED     = &HF800
  Dim integer GREEN   = &H07E0
  Dim integer CYAN    = &H07FF
  Dim integer MAGENTA = &HF81F
  Dim integer YELLOW  = &HFFE0
  Dim integer WHITE   = &HFFFF

  Dim integer ksize=49
  Dim integer kspace=8
  Dim integer kColor=green
  Dim integer kRad=8
  Dim integer toffX=12
  Dim integer toffY=8
  Dim integer tfont=4
  Dim integer tFColor=black
  Dim integer tBColor=green

  Dim integer gutterX=10
  Dim integer gutterY=35
  Dim integer COL1=gutterX
  Dim integer COL2=COL1+ksize+kspace
  Dim integer COL3=COL2+ksize+kspace
  Dim integer COL4=COL3+ksize+kspace
  Dim integer ROW1=gutterY
  Dim integer ROW2=ROW1+ksize+kspace
  Dim integer ROW3=ROW2+ksize+kspace
  Dim integer ROW4=ROW3+ksize+kspace
  Dim integer ROW5=ROW4+ksize+kspace

DISPLAY open ILI9341S,2,11,3,2,240,320

numberpad

Do
Loop

Sub NumberPad
  CLS black
  BOX 1,1,239,319,yellow
  LINE 1,gutterY-kspace,239,gutterY-kspace,yellow
  DISPLAY 2,gutterX,4,CYAN,BLACK,"KBD - B11 470"

  RBOX COL1, ROW1, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL1+toffX,ROW1+toffY,tFColor,tBColor,"1"

  RBOX COL1, ROW2, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL1+toffX,ROW2+toffY,tFColor,tBColor,"4"

  RBOX COL1, ROW3, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL1+toffX,ROW3+toffY,tFColor,tBColor,"7"

  RBOX COL1, ROW4, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL1+toffX-10,ROW4+toffY,tFColor,tBColor,"CE"

  RBOX COL1, ROW5, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL1+toffX,ROW5+toffY,tFColor,tBColor,"="


  RBOX COL2, ROW1, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL2+toffX,ROW1+toffY,tFColor,tBColor,"2"

  RBOX COL2, ROW2, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL2+toffX,ROW2+toffY,tFColor,tBColor,"5"

  RBOX COL2, ROW3, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL2+toffX,ROW3+toffY,tFColor,tBColor,"8"

  RBOX COL2, ROW4, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL2+toffX,ROW4+toffY,tFColor,tBColor,"0"

  RBOX COL2, ROW5, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL2+toffX,ROW5+toffY,tFColor,tBColor,"C"


  RBOX COL3, ROW1, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL3+toffX,ROW1+toffY,tFColor,tBColor,"3"

  RBOX COL3, ROW2, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL3+toffX,ROW2+toffY,tFColor,tBColor,"6"

  RBOX COL3, ROW3, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL3+toffX,ROW3+toffY,tFColor,tBColor,"9"

  RBOX COL3, ROW4, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL3+toffX,ROW4+toffY,tFColor,tBColor,"."

  RBOX COL3, ROW5, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL3+toffX-10,ROW5+toffY,tFColor,tBColor,"+-"


  RBOX COL4, ROW1, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL4+toffX,ROW1+toffY,tFColor,tBColor,"+"

  RBOX COL4, ROW2, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL4+toffX,ROW2+toffY,tFColor,tBColor,"-"

  RBOX COL4, ROW3, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL4+toffX,ROW3+toffY,tFColor,tBColor,"X"

  RBOX COL4, ROW4, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL4+toffX,ROW4+toffY,tFColor,tBColor,"/"

  RBOX COL4, ROW5, ksize, ksize,kRad,kcolor,f
  DISPLAY tfont,COL4+toffX,ROW5+toffY,tFColor,tBColor,"%"

End Sub



End                                